<?php
/**
 * 跃飞科技版权所有 @2017
 * Date: 2017/5/24
 * Time: 11:32
 */
namespace app\admin\validate;

use think\Validate;

class Ad extends Validate
{
    protected $rule = [
        'ad_name'  =>  'require',
        'ad_img'  =>  'require',
//        'ad_id'  =>  'require',
        'start_time'  =>  'require',
        'end_time'  =>  'require',
        'ad_url'  =>  'require',
        'show_order'  =>  'number|require',
    ];

    protected $message  =   [
        'ad_name.require' => '广告名称必填!',
        'ad_img.require' => '广告图片必须上传!',
        'start_time.require' => '开始时间必填!',
        'end_time.require' => '结束时间必填!',
        'ad_url.require' => '广告链接必须',
        'show_order.require' => '排序必填',
        'show_order.number' => '排序必须是数字',
    ];
}